from PIL import Image
img = Image.open("earth.jpg")
width, height = img.size
img = img.resize((int(width/5), int(height/5)))
img = img.resize((width, height), resample=Image.NEAREST)
img.save("earth_zoom.jpg", "JPEG")
img.show()
